package com.shd.edanpei.ui.adapter;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseViewHolder;
import com.shd.edanpei.R;
import com.shd.edanpei.base.BaseQuickImageAdapter;
import com.shd.edanpei.bean.ProductBean;
import com.shd.edanpei.enums.OrderTypeEnum;
import com.shd.edanpei.util.contact.ProductTypeListBean;

import java.util.List;

public class ProductNewAdapter extends BaseQuickImageAdapter<ProductTypeListBean> {

    private Context context;

    public ProductNewAdapter(Context context) {
        super(context, R.layout.item_pulish_products);
        this.context=context;
    }

    @Override
    protected void convert(BaseViewHolder helper, ProductTypeListBean productTypeListBean) {
//        if (mType == 1) {
//            //上架产品
//            helper.getView(R.id.view_gray).setVisibility(View.GONE);
//        } else {
//            //下架产品
//            helper.getView(R.id.view_gray).setVisibility(View.VISIBLE);
//        }
        helper.addOnClickListener(R.id.order_img);
        Glide.with(context).load(productTypeListBean.getPic()).into((ImageView) helper.getView(R.id.order_img));
    }
}
